package org.wpml.herostory;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @Description
 * @Date 2021-04-26
 * @Author wang pei
 **/
public class Log4j2Test {
//    private static Logger logger= LogManager.getLogger(Log4j2Test.class);
    private static Logger logger= LogManager.getLogger();

    public static void main(String[] args) {

        String thing = args.length > 0 ? args[0] : "world";
        logger.info("Hello, {}!", thing);
        logger.debug("Got calculated value only if debug enabled: {}", () -> doSomeCalculation());
    }

    private static Object doSomeCalculation() {
       return null;
    }
}
